<form class="form-horizontal form-validate form-modal" method="post" action="{:url('warrant')}">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">授权管理</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-sm-3 control-label">当前层级：</label>
                    <div class="col-sm-5 m-t-mc">
                        {$userInfo.proxyLevel.proxy_name}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">当前授权结束：</label>
                    <div class="col-sm-5 m-t-md">
                        {if condition="$userInfo.warrant_end_time > 0"}
                        {$userInfo.warrant_end_time|dateTpl='Y-m-d H:i',true}
                        {else/}
                        <span class="red">未授权</span>
                        {/if}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">代理状态：</label>
                    <div class="col-sm-8 ">
                        {volist name="statusArr" id="val"}
                        <label class="radio-inline">
                            <input type="radio" name="status" class="js_radio_undertake" value="{$key}" {$userInfo['status']==$key?'checked':''}
                            data-class="{$key==1?'check_ok':$key==9?'check_error':''}" />
                            {$val}
                        </label>
                        {/volist}
                    </div>
                </div>
                <div class="radio_undertake_status check_ok {$userInfo['status']==1?'':'hide'}">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">授权层级：</label>
                        <div class="col-sm-5 ">
                            <select name="proxy_id"  style="width: 130px;" data-toggle="select2" >
                                <option value="">选择层级</option>
                                {volist name="proxyLevel" id="vo"}
                                <option value="{$vo.proxy_id}"}>{$vo.proxy_name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">授权结束时间：</label>
                        <div class="col-sm-4 ">
                            <div class="input-group"> <input type="text" class="input-max" name="warrant_end_time" readonly="readonly"  value="{$warrant_end_time|dateTpl='Y-m-d H:i',true}"  data-toggle="datetimepicker"  data-position="bottom-right" /><span class="input-group-addon"><i class="fa fa-calendar"></i></span></div>
                        </div>
                    </div>
                </div>
                <div class="radio_undertake_status check_error {$userInfo['status']>=2?'':'hide'}">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">操作备注：</label>
                        <div class="col-sm-8" >
                            <textarea type="text" style="height:50px;" class="input-max" name="check_remark"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <input type="hidden" value="{$userInfo.user_id}" name="user_id" />
                <button type="submit" class="btn btn-primary" data-loading-text="保存中..." disabled>保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</form>
